package org.dxy.domain.event.workstation;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Value;
import org.dxy.domain.event.AggregateTypeEnum;
import org.dxy.domain.event.DomainEvent;

import java.time.LocalDateTime;

/**
 * @description: 事件：工位被删除或注销
 * <p>表示工位被移除，生命周期终止</p>
 * @author: dxy
 * @createTime: 2025/6/18 22:39
 */
@Value
@Builder
@AllArgsConstructor
public class WorkstationRemovedEvent implements DomainEvent {

    /**
     * 工位 ID
     */
    Long workstationId;

    /**
     * 删除操作人
     */
    String removedBy;

    /**
     * 删除时间
     */
    LocalDateTime removedAt;
    
    @Override
    public Long aggregateId() {
        return workstationId;
    }
    
    @Override
    public String aggregateType() {
        return AggregateTypeEnum.WORKSTATION.getKey();
    }
    
    @Override
    public String eventType() {
        return WorkstationEventTypeEnum.REMOVED.getKey();
    }
}